Skip to content

[Hotfix] Implement quantization compressor methods on dense compressor #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 9, 2025

Conversation

kylesayrs
Copy link
Contributor

Background

Purpose

Changes

  • Implement decompress_module_from_state_dict on DenseCompressor

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Copy link
Member

@rahul-tuli rahul-tuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just delete the dense compressor?

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs
Copy link
Contributor Author

@rahul-tuli We can talk more about this somewhere else. I'd rather keep the/a dense compressor and get rid of the nullable property of compressors. This would make a lot of code much cleaner.

if compressor is not None:
  compressor.compress(model)

if compressor is not None:
  compressor.decompress(model)

is a lot more annoying to check every time you want to use a compressor programmatically, rather than a simply narrow type

compressor.compress(model)
compressor.decompress(model)

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@rahul-tuli
Copy link
Member

@rahul-tuli We can talk more about this somewhere else. I'd rather keep the/a dense compressor and get rid of the nullable property of compressors. This would make a lot of code much cleaner.

if compressor is not None:

  compressor.compress(model)



if compressor is not None:

  compressor.decompress(model)

is a lot more annoying to check every time you want to use a compressor programmatically, rather than a simply narrow type

compressor.compress(model)

compressor.decompress(model)

Sounds good @kylesayrs, could you create a ticket/issue so we remember to revisit this?

Approving the PR!

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs kylesayrs requested a review from rahul-tuli June 9, 2025 18:50
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Copy link
Contributor

@shanjiaz shanjiaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kylesayrs kylesayrs merged commit b3e89a2 into main Jun 9, 2025
1 check passed
@kylesayrs kylesayrs deleted the kylesayrs/hotfix-dense-compressor branch June 9, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants